import request from '@/utils/request'

//枚举地址
enum API {
  MENU_LIST = '/menu/list',
  MENU_ADD = '/menu/add',
  MENU_DELETE = '/menu/delete',
  MENU_EDIT = '/menu/edit',
}

// 编辑菜单
export const reqMenuEdit = (data) => request.post(API.MENU_EDIT, data)

// 删除菜单
export const reqMenuDelete = (params) =>
  request.get(API.MENU_DELETE, { params })

// 菜单列表
export const reqMenuList = () => request.get(API.MENU_LIST)

// 新增菜单
export const reqMenuAdd = (data) => request.post(API.MENU_ADD, data)
